package o;

import android.content.Context;
import android.os.Bundle;
import androidx.annotation.NonNull;
import com.huawei.appmarket.service.alarm.control.RepeatingTaskManager;

public class dpl {
    public static void ˋ(@NonNull Context context, int i) {
        if (System.currentTimeMillis() - edn.ˋ().ॱ() < 3600000) {
            Logger.ˎ("BackgroundTaskExecutor", "execute error: less than 1 hour");
            return;
        }
        int ʽॱ = edl.ˏ().ʽॱ();
        int ˋ = ˋ(i);
        if (ˋ == -1 || (ʽॱ & ˋ) == 0) {
            Logger.ˎ("BackgroundTaskExecutor", "execute error: start flag is close, startFlag: " + ˋ);
            return;
        }
        Logger.ˏ("BackgroundTaskExecutor", "background execute, startType:" + i);
        Bundle bundle = new Bundle();
        bundle.putInt(RepeatingTaskManager.KEY_PRE_DOWNLOAD_START_TYPE, i);
        RepeatingTaskManager.executeJobTasks(context, bundle, 10001);
    }

    private static int ˋ(int i) {
        if (i == 15) {
            return 4;
        }
        if (i == 16) {
            return 2;
        }
        if (i == 17) {
            return 1;
        }
        return -1;
    }
}
